var FormBasic = function(){
	var handleMultiSelect = function (selectId) {
        $('#' + selectId).multiSelect({
            selectableOptgroup: true
        });        
   };
   
   var handleTag = function(tagList, tagId){
   		$tag = new Array();
   		$("." + tagList).each(function(){
   			$tag.push($(this).val());
   		});
   		$("#" + tagId).select2({
            tags: $tag
        });
   };
    
   return {
        //main function to initiate the module
        init: function (tagList, tagId) {
        	
        	handleTag(tagList, tagId);
        }
   };
}();
